package com.cloud.lan.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cloud.lan.entity.model.dataobject.LanMpUserDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 用户信息表 Mapper 接口
 * </p>
 *
 * @author xyqierkang@163.com
 * @since 2021-12-06
 */
@Mapper
public interface LanMpUserMapper extends BaseMapper<LanMpUserDO> {

    @Select("SELECT * FROM lan_mp_users WHERE open_id= #{openId} AND is_deleted=0")
    LanMpUserDO getMpUserByOpenId(@Param("openId") String openId);

    @Select("SELECT * FROM lan_mp_users WHERE union_id= #{unionId} AND is_deleted=0")
    LanMpUserDO getMpUserByUnionId(@Param("unionId") String unionId);
}
